Skip to content

Update to support new DB structure with multiple pockets. - #851

Merged
nakib103 merged 3 commits into
Ensembl:postreleasefix/116from
jamie-m-a:feature/protvar_update
Aug 3, 2026
Merged

Update to support new DB structure with multiple pockets. #851
nakib103 merged 3 commits into
Ensembl:postreleasefix/116from
jamie-m-a:feature/protvar_update

Conversation

@jamie-m-a

Copy link
Copy Markdown
Contributor

ProtvarDB generation had a slight issue, it wouldn't store more than one protein pocket per variant (over wrote if there were more than one).

A new generation script was made to create the new DB structure (and run faster by downloading all required data then caching in memory). Runs in ~25 mins versus days. New script and new DB in:

Updated plugin works on old and new DBs - backward compatible.

Files are in /nfs/production/flicek/ensembl/variation/data/ProtVar
create_uniprot_id_list.pl (script to generate all require uniprot IDs)
prepare_data.pl (script to generate new SQL DB)
ProtVar_data_UPDATE.db (generated DB)

The following variant demonstrates the difference:
11 19237425 . T G

Looking at the ProtVar_pocket field output.

Pointing at old DB /nfs/production/flicek/ensembl/variation/data/ProtVar/data/ProtVar_data.db

P12&515.7658017356196&87.736875&0.330738&0.747748&4.331085&p114p115p117p118p119p120p123p316p319p320p321p322p323p324p330p343

Just P12 pocket

Pointing at new DB /nfs/production/flicek/ensembl/variation/data/ProtVar/ProtVar_data_UPDATE.db

P4&897.4969555629044&83.33136363636362&0.362285&0.789264&7.645393&p111p112p113p114p115p116p117p118p119p120p121p124p149p150p151p152p153p156p313p316p317p320&P12&515.7658017356196&87.736875&0.330738&0.747748&4.331085&p114p115p117p118p119p120p123p316p319p320p321p322p323p324p330p343

Now both a P4 and P12 pocket

Verifying on ProtVar

Screenshot 2026-07-27 at 11 31 24

@jamie-m-a
jamie-m-a requested a review from nakib103 July 27, 2026 10:40
Comment thread ProtVar.pm Outdated
$self->{config}->{output_format} eq "vcf"
? "(fields are separated by '&') "
: "(fields are separated by ',') ";
$header{ProtVar_pocket} = "Information about overlapping protein pocket. Output records are separated by '&'; field(s) include: ";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jamie-m-a , Looks good. 👍
For other output format the delimiter is , but for VCF it is &. So we need to update the header description here.

Also Needs to properly use delimiter in the output,
for VCF two pocket output are delimited by & as well as the fields for those pocket output, so we cannot separate two pockets -

P4&897.4969555629044&83.33136363636362&0.362285&0.789264&7.645393&p111p112p113p114p115p116p117p118p119p120p121p124p149p150p151p152p153p156p313p316p317p320&P12&515.7658017356196&87.736875&0.330738&0.747748&4.331085&p114p115p117p118p119p120p123p316p319p320p321p322p323p324p330p343

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - simplest was to follow standard field arrangement, so reverted to that.

@jamie-m-a
jamie-m-a requested a review from nakib103 August 3, 2026 11:40
Comment thread ProtVar.pm Outdated
my $key = "ProtVar_" . $item;
my @formatted_records;
my $field_delimiter = $self->{config}->{output_format} eq "vcf" ? "&" : ",";
my $record_delimiter = "|";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

record delimiter in vcf would not work here as it is already used as separator between CSQ field , e.g. -
G|missense_variant|MODERATE|...

phenotype with similar output format uses + as field delimiter and & as record delimiter. We can re-use same logic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, switched

@jamie-m-a
jamie-m-a requested a review from nakib103 August 3, 2026 12:55

@nakib103 nakib103 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jamie-m-a

@nakib103
nakib103 merged commit e0ff099 into Ensembl:postreleasefix/116 Aug 3, 2026
@nakib103

nakib103 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

merged to main and release/116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants